package com.appleat.springbootstart.controller;

import com.appleat.springbootstart.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @Author dj.wang
 * @Date 2019/12/19 15:40
 * @Version V1.0
 */
@Controller
public class IndexController
{
    @Autowired
    private TestService service;

    @GetMapping
    public String index(ModelMap model)
    {
        model.put("list", service.listTest());
        return "index";
    }
}
